import request from '@/axios'
// 订单列表
export const getOrderPageList = (params: any) => {
  return request.get({ url: '/order/list', params })
}

// 订单详情接口
export const getOrderDetail = (orderNo: string) => {
  return request.get({ url: '/order/detail/' + orderNo })
}

// 订单日志
export const getOrderLogs = (orderNo: string) => {
  return request.get({ url: '/order/logs/' + orderNo })
}

// 后台下单接口
export const placeOrder = (data: any) => {
  return request.post({ url: '/order/create', data })
}

// 更新订单状态接口
export const updateOrderStatus = (data: {
  orderNo: string
  orderStatus: number
  remark: string
}) => {
  return request.post({ url: '/order/updateStatus', data })
}

// 更新订单金额接口
export const updateOrderAmount = (data: { orderNo: string; payAmount: number; remark: string }) => {
  return request.post({ url: '/order/updateAmount', data })
}
